package com.nf.entity;

public class ImpPrivceB implements IPrivce {
    private float rate;
    private float pricing;

    public void setRate(float rate) {
        this.rate = rate;
    }

    public void setPricing(float pricing) {
        this.pricing = pricing;
    }


    public void setPricingRate(float rate,float pricing){
        this.rate = rate;
        this.pricing = pricing;
    }

    @Override
    public float show(float e) {
        if(e<=pricing){
            return 0;
        }else {
            return (e-pricing)*rate;
        }
    }
}
